package cn.onein.edu.web.service;

import java.util.List;

import cn.onein.edu.biz.bean.Item;
import cn.onein.edu.biz.bean.Order;
import cn.onein.edu.biz.bean.Product;
import cn.onein.edu.common.OrderStatusType;
import cn.onein.edu.common.PaymentType;

public interface PaymentService {

	public abstract Product getProductById(Long id);
	
	public abstract Order insertOrderAndItem(Order order,Item item);
	
	public abstract List<Order> getOrderByUserId(Long userId);
	
	public abstract List<Item> getItemByOrderId(Long orderId);
	
	public abstract List<Product> getProductByType(Integer type);
	
	public abstract Order getOrderByOrderNo(String orderNo);
	
	public abstract void updateOrderStatusByOrderNo(String orderNo,OrderStatusType type);
	
	public abstract Order getLastOrderByUserId(Long userId);
	
	public abstract void orderSuccessByOrderNo(String orderNo,String payNo,PaymentType paymentType);
	
	public abstract void updateOrderPaymentTypeByOrderNo(String orderNo,PaymentType aymentType);
}
